import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      redirect:'/index'
    },
    {
      path: '/index',
      component: () => import('./views/Index.vue'),
      redirect:'/home',
      children:[
        {
          path: '/home',
          component: () => import('./views/Home.vue')
        },
        {
          path: '/cate',
          component: () => import('./views/Cate.vue')
        },
        {
          path: '/list1',
          component: () => import('@/components/list1.vue')
        },
        {
          path: '/list2',
          component: () => import('@/components/list2.vue')
        },
        {
          path: '/list3',
          component: () => import('@/components/list3.vue')
        },
        {
          path: '/list4',
          component: () => import('@/components/list4.vue')
        },
        {
          path: '/list5',
          component: () => import('@/components/list5.vue')
        },
        {
          path: '/list6',
          component: () => import('@/components/list6.vue')
        },
      ]
    },
    {
      path: '/about',
      component: () => import('./views/About.vue')
    },

  ]
})
